<?php /* Smarty version Smarty-3.1.18, created on 2017-06-02 10:31:19
         compiled from "/data/www/mystery/protected/views/benchmark/suggest.tpl" */ ?>
<?php /*%%SmartyHeaderCode:1061380983552b8f9f845aa6-29172017%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '220f53effa4d4b48fadf681480bc13a9501e2f90' => 
    array (
      0 => '/data/www/mystery/protected/views/benchmark/suggest.tpl',
      1 => 1494904490,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '1061380983552b8f9f845aa6-29172017',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_552b8f9f87a520_20496280',
  'variables' => 
  array (
    'subject_info' => 0,
    'info' => 0,
    'subject_id' => 0,
    'nq_id' => 0,
    'iframe' => 0,
    'referer' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_552b8f9f87a520_20496280')) {function content_552b8f9f87a520_20496280($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("../common/iframe_head.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<link href="/css/uploadify.css" rel="stylesheet">
<script src="/js/jquery.uploadify.min.js"></script>
<form name='myForm1' id='myForm1' method='post' action='/benchmark/dosuggest'>
    <div style='margin:10px;'>
        <table>
            <tr><td><b>题目：</b></td><td><b><?php echo $_smarty_tpl->tpl_vars['subject_info']->value['question_num'];?>
<?php echo $_smarty_tpl->tpl_vars['subject_info']->value['title'];?>
</b></td></tr>
            <tr>
                <td>建议：</td>
                <td><textarea id="suggestion" name="suggestion" cols='65' rows='12'><?php echo $_smarty_tpl->tpl_vars['info']->value['suggestion'];?>
</textarea></td>
            </tr>
            <tr><td colspan='2'><input type='submit' class="button" value='提交'></td></tr>
        </table>
            <input type='hidden' name='subject_id' value='<?php echo $_smarty_tpl->tpl_vars['subject_id']->value;?>
' />
        <input name='nq_id' type='hidden' value='<?php echo $_smarty_tpl->tpl_vars['nq_id']->value;?>
' />
        <input type="hidden" name="qb_id" value="<?php echo $_smarty_tpl->tpl_vars['info']->value['qb_id'];?>
"
    </div>
</form>
    <script>
        $(document).ready(function() {     
                var options = {         
                    beforeSubmit:  showRequest,  
                    success:       showResponse,
                    dataType:  'json'
                }
                $('#myForm1').ajaxForm(options);    
        });
            function showRequest(formData, jqForm, options) { 
                var suggestion = $('#suggestion').val();
                if (suggestion=='') {
                    alert('建议不能为空');
                    return false;
                }
                return true;
            }
            function showResponse(responseText, statusText, xhr, $form)  { 
                alert(responseText.note);
                if (responseText.status==1) {
                    window.parent.thisPage = false;
                    //window.parent.location.reload();
                    <?php if ($_smarty_tpl->tpl_vars['iframe']->value==1) {?>
                    window.parent.location.reload();
                    <?php } else { ?>
                    window.parent.location.href='<?php echo $_smarty_tpl->tpl_vars['referer']->value;?>
&subject_id=<?php echo $_smarty_tpl->tpl_vars['subject_info']->value['subject_id'];?>
';
                    <?php }?>
                }    
            }
    </script><?php }} ?>
